﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ServerClientCommon
{
    public class BooleanSensorsPreset
    {

        #region PrivateMembers
        /// <summary>
        /// Enables/Disables the preset
        /// </summary>
        private bool usePreset;
        /// <summary>
        /// Overwites the default humidityDanger value
        /// </summary>
        private bool humidityDanger;
        /// <summary>
        /// Overwites the default notEnoughLight value
        /// </summary>
        private bool notEnoughLight;
        /// <summary>
        /// Overwites the default gasProblem value
        /// </summary>
        private bool gasProblem;
        /// <summary>
        /// Overwites the default rfidEmptyRoom value
        /// </summary>
        private bool rfidEmptyRoom;
        /// <summary>
        /// Overwites the default powerDown value
        /// </summary>
        private bool powerDown;
        #endregion

        #region Constructors
        /// <summary>
        /// Creates a BooleanSensorsPreset object
        /// </summary>
        /// <param name="usePreset">Enables/Disables the preset</param>
        /// <param name="humidityDanger">Overwites the default humidityDanger value</param>
        /// <param name="notEnoughLight">Overwites the default notEnoughLight value</param>
        /// <param name="gasProblem">Overwites the default gasProblem value</param>
        /// <param name="rfidEmptyRoom">Overwites the default rfidEmptyRoom value</param>
        /// <param name="powerDown">Overwites the default powerDown value</param>
        public BooleanSensorsPreset(bool usePreset,
                                    bool humidityDanger,
                                    bool notEnoughLight,
                                    bool gasProblem,
                                    bool rfidEmptyRoom,
                                    bool powerDown)
        {
            this.usePreset = usePreset;
            this.humidityDanger = humidityDanger;
            this.notEnoughLight = notEnoughLight;
            this.gasProblem = gasProblem;
            this.rfidEmptyRoom = rfidEmptyRoom;
            this.powerDown = powerDown;
        }

        /// <summary>
        /// Creates a BooleanSensorsPreset object
        /// </summary>
        /// <param name="useDefaultPreset">Enables/Disables the preset</param>
        public BooleanSensorsPreset(bool useDefaultPreset):
            this(useDefaultPreset,false,false,false,false,false)
        {
            //This should be empty
        }

        /// <summary>
        /// Creates a BooleanSensorsPreset object
        /// </summary>
        public BooleanSensorsPreset():
            this(false,false,false,false,false,false)
        {
            //This should be empty
        }
        #endregion

        #region Properties
        /// <summary>
        /// Enables/Disables the preset
        /// </summary>
        public bool UsePreset
        {
            get { return usePreset; }
            set { usePreset = value; }
        }
        /// <summary>
        /// Overwrites the HumidityDanger value if preset is enabled
        /// </summary>
        public bool HumidityDanger
        {
            get { return humidityDanger; }
            set { humidityDanger = value; }
        }
        /// <summary>
        /// Overwrites the NotEnoughLight value if preset is enabled
        /// </summary>
        public bool NotEnoughLight
        {
            get { return notEnoughLight; }
            set { notEnoughLight = value; }
        }
        /// <summary>
        /// Overwrites the GasProblem value if preset is enabled
        /// </summary>
        public bool GasProblem
        {
            get { return gasProblem; }
            set { gasProblem = value; }
        }
        /// <summary>
        /// Overwrites the RfidEmptyRoom value if preset is enabled
        /// </summary>
        public bool RfidEmptyRoom
        {
            get { return rfidEmptyRoom; }
            set { rfidEmptyRoom = value; }
        }
        /// <summary>
        /// Overwrites the PowerDown value if preset is enabled
        /// </summary>
        public bool PowerDown
        {
            get { return powerDown; }
            set { powerDown = value; }
        }
        #endregion

    }
}
